<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('production_process', function (Blueprint $table) {
            $table->id()->unique()->comment('id');
$table->integer('production_order_id')->comment('生产工单id');
$table->tinyInteger('sort')->comment('工序顺序');
$table->string('process_code', 20)->comment('工艺代码');
$table->string('process_name', 50)->comment('工艺名称');
$table->integer('parent_id')->default(0)->comment('上级工艺');
$table->creatorId();
$table->createdAt();
$table->updatedAt();
$table->deletedAt();

$table->engine='InnoDB';
$table->comment('生产工单工序');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('production_process');
    }
};
